<div class="section">
        <?php
        $this->widget('AdminManCompMenu', array(
            'comp_id' => $model->id,
            'comp_title' => $model->title,
        ));
        ?>
<?if(Yii::app()->user->hasFlash('opersuc')):?>
    <div class="messages green" title="Клик, чтобы скрыть" onclick="$(this).fadeOut();" style="cursor:pointer;float:left;clear: both;padding-right: 10px;"><span></span><?=Yii::app()->user->getFlash('opersuc');?> </div>
<? endif ?>
		<div class="box">
			<div class="title">
				<h2><?=Yii::t('app','Список заявок')?></h2>
				<span class="hide"></span>
			</div>
			<div class="content">
<a href="<?=$this->createUrl('/mancompanies/createorder/comp_id/'.$model->id);?>" class="button green" style="opacity: 1; "><?=Yii::t('app','Добавить заявку')?></a>
                <br/><br/>
                <?=CHtml::beginForm(); ?>
				<table cellspacing="0" cellpadding="0" border="0" class="table-all"> 
					<thead> 
						<tr> 
							<th><input type="checkbox" name="check" class="checkall"></th>
							<th class="header"><?=Yii::t('app','Имя фонда')?></th>
							<th class="header"><?=Yii::t('app','Статус')?></th>
							<th></th>
						</tr> 
					</thead> 
					<tbody>
<?$i=0;?>                                            
<?foreach($orders as $order):?>
<tr class="
<?
    if(($i % 2) == 0) echo "odd";
      else echo "even";
        $i++;
?>
">
<td><input type="checkbox" name="check[<?=$order['id'];?>]"></td>
<td><a href="<?=$this->createUrl("mancompanies/editorder/id/".$order['id']."/comp_id/$model->id");?>"><?=$order['fund_title'];?></a></td>
<td>
    <?switch($order['status']){
        case '0': echo '<span class="yes status_ny">Принята</span>'; break;
        case '1': echo '<span class="no status_ny">Не выкуплена</span>'; break;
        case '2': echo '<span class="yes status_ny">Выкуплена</span>'; break;
        case '3': echo '<span class="no status_ny">Отклонена</span>'; break;
    }?>
</td>
<td>
   	<a href="<?=$this->createUrl("mancompanies/editorder/id/".$order['id']."/comp_id/".$model->id);?>"><img src="<?= Yii::app()->theme->baseUrl ?>/gfx/icon-edit.png" alt="edit"></a>
	 <?=CHtml::link('<img src="'.Yii::app()->theme->baseUrl.'/gfx/icon-delete.png" alt="delete">',$this->createUrl("mancompanies/delorder/id/".$order['id']."/comp_id/$model->id"),array('',
                                   'confirm'=>'Вы уверены что хотите удалить этот элемент?')
		)?>
</td>
</tr>

<?endforeach?>
					</tbody>
				</table>
				<div id="pager" class="pager">

						<!--<button type="submit" class="red">
                                                    <span>
                                                        <?php //echo Yii::t('app','Удалить выбранное');?>
                                                    </span>
                                                </button>-->
						<div>
							<img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-first.gif" class="first" alt="First">
							<img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-prev.gif" class="prev" alt="Previous">
							<input type="text" class="pagedisplay">
							<img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-next.gif" class="next" alt="Next">
							<img src="<?= Yii::app()->theme->baseUrl ?>/gfx/table-last.gif" class="last" alt="Last">
						</div>

                            <select class="pagesize" tabindex="-1">
                                                    <option selected="selected" value="5">5</option>
                                                    <option value="10">10</option>
                                                    <option value="25">25</option>
                                                    <option value="50">50</option>
                                                </select>
                     
                       
						<?=CHtml::endForm(); ?>
				</div>
			</div>
		</div>
	
